package week08;

import java.awt.*;

/**
 * Created by cx on 17-11-3.
 */
public class PlaneProxy implements Plane{
    private Plane plane;
    public  PlaneProxy(Plane plane2){
        this.plane=plane2;
    }

    @Override
    public void takeOff() {
        PlaneFactory planeFactory =new PlaneFactory();
        planeFactory.createFactory();
        PlaneInAirPort planeInAirPort =new PlaneInAirPort(plane);
        System.out.println("---代理拦截---");
        planeInAirPort.schedule();
    }
}
